import {
	get,
	post,
	put,
} from '@/utils/request.js'

/**
 * 商家订阅和取消订阅
 */
export const businessSubscribeUpdateStateApi = (data) => {
	return put('/businessSubscribe/updateState', data)
}

/**
 * 发布活动
 */
export const releaseApi = (data) => {
	return post('/businessActive/release', data)
}

/**
 * 我的活动列表
 */
export const getMyActiveApi = (data) => {
	return get('/businessActive/pageMyActive', data)
}

/**
 * 我的活动详情(去发布)
 */
export const myActiveDetailApi = (id) => {
	return get(`/businessActive/myActiveDetails?id=${id}`)
}
/**
 * 我的活动详情(去发布)
 */
export const pageMyBusiness = (data) => {
	return get(`/user/pageMyBusiness`,data)
}
/**
 * 策划人
 */
export const listMyBusiness = (data) => {
	return get(`/user/listMyBusiness`,data)
}

/**
 * 获取自有商户的商家关联的商户列表
 */
export const getMyBusinessMerchantList = () => {
	return get(`/user/listMyBusinessMerchant`)
}